<md-card>
    <table ng-if="settings" class="table">


        <tr>
            <th>Proxies compression to backends</th>
        </tr>
        <tr>
            <td>
                <md-switch ng-disabled="selectedCluster.apiUsers[user].grants['cluster-settings']==false" ng-true-value="true" ng-false-value="false" ng-model="selectedCluster.config.proxyServersBackendCompression"
                           ng-click="switchsettings('proxy-servers-backend-compression')" aria-label="Proxies compression">
                    <span ng-if="selectedCluster.config.proxyServersBackendCompression" class="label label-primary">On</span><span
                        ng-if="!selectedCluster.config.proxyServersBackendCompression" class="label label-warning">Off</span>
            </td>
            </md-switch>
            </td>
        </tr>

        <tr>
            <th>Proxies reads on writer</th>
        </tr>
        <tr>
            <td>
                <md-switch ng-disabled="selectedCluster.apiUsers[user].grants['cluster-settings']==false" ng-true-value="true" ng-false-value="false"
                           ng-model="selectedCluster.config.proxyServersReadOnMaster"
                           ng-click="switchsettings('proxy-servers-read-on-master')" aria-label="Reads on Master">
                    <span ng-if="selectedCluster.config.proxyServersReadOnMaster"
                          class="label label-primary">On</span><span
                        ng-if="!selectedCluster.config.proxyServersReadOnMaster" class="label label-warning">Off</span>
            </td>
            </md-switch>
            </td>
        </tr>
        <tr>
            <th>Proxies reads on writer when no slave</th>
        </tr>
        <tr>
            <td>
                <md-switch ng-disabled="selectedCluster.apiUsers[user].grants['cluster-settings']==false" ng-true-value="true" ng-false-value="false"
                           ng-model="selectedCluster.config.proxyServersReadOnMasterNoSlave"
                           ng-click="switchsettings('proxy-servers-read-on-master-no-slave')" aria-label="Reads on Master when no slave">
                    <span ng-if="selectedCluster.config.proxyServersReadOnMasterNoSlave"
                          class="label label-primary">On</span><span
                        ng-if="!selectedCluster.config.proxyServersReadOnMasterNoSlave" class="label label-warning">Off</span>
            </td>
            </md-switch>
            </td>
        </tr>
          <th>Proxies Max Backend Connections</th>
        </tr>
        <tr>
            <td>
                <md-slider ng-disabled="selectedCluster.apiUsers[user].grants['cluster-settings']==false" ng-value="selectedCluster.config.proxyServersBackendMaxConnections" md-discrete flex
                           ng-model="selectedProxiesMaxConnections" ng-change="changeproxiesmaxconnections(selectedProxiesMaxConnection)" step="100" min="100" max="10000" aria-label="delay">
                </md-slider>

                <span class="label label-primary">{{selectedCluster.config.proxyServersBackendMaxConnections}}</span>

            </td>
        </tr>
      </tr>
        <th>Proxies Max Backend Repl Lag for Reads</th>
      </tr>
      <tr>
          <td>
              <md-slider ng-disabled="selectedCluster.apiUsers[user].grants['cluster-settings']==false" ng-value="selectedCluster.config.proxyServersBackendMaxReplicationLag" md-discrete ng-if="selectedCluster.config.proxyServersBackendMaxReplicationLag" flex
                         ng-model="selectedProxiesMaxSlaveDelay" ng-change="changeproxiesmaxdelay(selectedProxiesMaxSlaveDelay)" step="1" min="10" max="5000" aria-label="delay">
              </md-slider>

              <span class="label label-primary">{{selectedCluster.config.proxyServersBackendMaxReplicationLag}}</span>

          </td>
      </tr>

    </table>
</md-card>
